<?php
// 应用公共文件

/**
 * @param $status
 * @param string $message
 * @param array $data
 * @param int $httpStatus
 * @return \think\response\Json
 */
function show($status, $message = "error", $data = [], $httpStatus = 200, $dataArr = [])
{
    $result = [
        "status" => $status,
        "message" => $message,
        "result" => $data,
    ];
    return json($result, $httpStatus);
}

function pageShow($status, $message = "error", $data = [], $count,$httpStatus = 200){
    $result = [
        "code" => $status,
        "msg" => $message,
        "data" => $data,
        "count" => $count
    ];
    return json($result, $httpStatus);
}